package com.huawei.struts.action;

public class MailTest {
	public static void main(String[] args){  
	       //这个类主要是设置邮件  
	    MailSenderInfo mailInfo = new MailSenderInfo();   
	    
	    mailInfo.setFromAddress("huganpu12345@163.com");   
	     mailInfo.setToAddress("huganpu12345@sina.com");   
	     mailInfo.setSubject("设置邮箱标题");   
	     mailInfo.setContent("<table border=1 cellspacing=1 cellpadding=1 width=1>"
   +" <tbody> <tr> <td>姓名</td> <td>年龄</td> </tr> <tr>  <td>胡赶谱</td> <td>24</td> </tr> <tr> <td>符夏敏</td><td>23</td> </tr> </tbody></table>");   
	        //这个类主要来发送邮件  
	     SimpleMailSender sms = new SimpleMailSender();  
	         sms.sendTextMail(mailInfo);//发送文体格式   
	         sms.sendHtmlMail(mailInfo);//发送html格式  
	   }  


}
